<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:composite="http://java.sun.com/jsf/composite"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:t="http://myfaces.apache.org/tomahawk">
<h:head>
</h:head>
<h:body>
	<h:form>
		<div class="row">
			<div class="logo">
				<h:outputText id="courtHeader" value="#{menu.courtHeader}"
					style="font-size:1.7em;font-style:italic;font-weight:bolder;" />

				<script type="text/javascript">
					function applyShadow(targetElement, shadowColor,
							shadowOffset, opacityValue) {
						if (typeof (targetElement) != 'object') {
							targetElement = document
									.getElementById(targetElement);
						}

						var value = targetElement.firstChild.nodeValue;
						targetElement.style.position = 'relative';
						targetElement.style.zIndex = 1;

						var newEl = document.createElement('span');
						newEl.appendChild(document.createTextNode(value));
						newEl.className = 'shadowed';
						newEl.style.color = shadowColor;
						newEl.style.position = 'absolute';
						newEl.style.left = shadowOffset + 'px';
						newEl.style.top = shadowOffset + 'px';
						newEl.style.zIndex = -1;

						targetElement.appendChild(newEl);
					}

					applyShadow('headerForm:courtHeader', '#111', 3, 0.6);
				</script>
			</div>
			<div class="headerMenuTop ui-button ui-corner-all">
				<h:commandLink value="#{link.text}" action="#{menu.logout}">
					<span class="ui-menuitem-icon ui-icon ui-icon-power"
						style="float: left;"></span>
					<span class="ui-menuitem-text">Logout</span>
				</h:commandLink>
			</div>
		</div>
	</h:form>
<div class="clearfix"></div>
	<div id="nav">
		<h:form>
			<div class="masthead">
				<ul class="nav nav-justified">
				${requestScope.page}
					<c:forEach var="link" items="#{menu.menu}">					
						<c:choose>
							<c:when test="#{link.navigationRule == page}">
								<li id="#{link.navigationRule}" class="active"><h:commandLink value="#{link.text}"
										action="#{link.doNavigation}" /></li>
							</c:when>
							<c:otherwise>
								<li id="#{link.navigationRule}" ><h:commandLink value="#{link.text}"
										action="#{link.doNavigation}" /></li>
							</c:otherwise>
						</c:choose>
					</c:forEach>
				</ul>
			</div>

<div class="clearfix"></div>
		</h:form>
	</div>

</h:body>
</html>

